package com.orangelife.mobile.widget.EditText;

import android.os.Handler;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;

/**
 * Created by Administrator on 2016/1/13.
 */
public  class EditTextChangeClick{
    public static final int RENT_SEARCH = -1;
    public void setEditTextChange(EditText editText, final Handler handler){
        editText.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {

            }

            @Override
            public void afterTextChanged(Editable s) {
                handler.sendEmptyMessage(RENT_SEARCH);
            }
        });
    }
}
